//package com.manor.main.utils;
//
//import android.content.Context;
//import android.graphics.Color;
//import android.graphics.drawable.Drawable;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.widget.RelativeLayout;
//import android.widget.TextView;
//
//import com.chuanglan.shanyan_sdk.tool.ShanYanUIConfig;
//
//import com.manor.main.R;
//import com.manor.main.activity.OtherPhoneLoginActivity;
//
//
//public class ConfigUtils {
//
//
//    /**
//     * 闪验三网运营商授权页配置类
//     *
//     * @param context
//     * @return
//     */
//
//    public static ShanYanUIConfig getUiConfig(Context context) {
//
//        Drawable logBtnImgPath = context.getResources().getDrawable(R.drawable.shanyan_demo_auth_bt);
//        LayoutInflater inflater = LayoutInflater.from(context);
//        RelativeLayout view_dialog = (RelativeLayout) inflater.inflate(R.layout.shanyan_demo_dialog_layout, null);
//        RelativeLayout.LayoutParams mLayoutParams3 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
//        view_dialog.setLayoutParams(mLayoutParams3);
//        view_dialog.setVisibility(View.GONE);
//
//
//        LayoutInflater inflater1 = LayoutInflater.from(context);
//        RelativeLayout relativeLayout = (RelativeLayout) inflater1.inflate(R.layout.other_login_item_view, null);
//        RelativeLayout.LayoutParams layoutParamsOther = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
//        layoutParamsOther.setMargins(0, AbScreenUtils.dp2px(context, 230), 0, 0);
//        relativeLayout.setLayoutParams(layoutParamsOther);
//
//        LayoutInflater inflater2 = LayoutInflater.from(context);
//        RelativeLayout relativeLayout2 = (RelativeLayout) inflater2.inflate(R.layout.other_login_view, null);
//        RelativeLayout.LayoutParams layoutParamsOther1 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
//        layoutParamsOther1.setMargins(0, 0, 0,  AbScreenUtils.dp2px(context, 210));
//        layoutParamsOther1.addRule(RelativeLayout.CENTER_HORIZONTAL);
//        layoutParamsOther1.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
//        relativeLayout2.setLayoutParams(layoutParamsOther1);
//
//
//
//        TextView mLoginTv = relativeLayout2.findViewById(R.id.tv_login);
//        mLoginTv.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                OtherPhoneLoginActivity.forward();
//            }
//        });
//
//        ShanYanUIConfig uiConfig = new ShanYanUIConfig.Builder()
//                .setActivityTranslateAnim("shanyan_demo_fade_in_anim", "shanyan_dmeo_fade_out_anim")
//                //授权页导航栏：
//                .setNavColor(Color.parseColor("#242C39"))  //设置导航栏颜色
//                .setNavText("")  //设置导航栏标题文字
//                .setNavReturnBtnWidth(35)
//                .setNavReturnBtnHeight(35)
//                .setLogoHidden(false)   //是否隐藏logo
//                .setLogoImgPath(context.getDrawable(R.mipmap.login_logo))
//                .setDialogDimAmount(0f)
//                .setFullScreen(false)   //全屏/不全屏
//                .setAuthBGImgPath(context.getDrawable(R.color.main_bg))
//                .setNavReturnImgHidden(true)//隐藏返回
//                .setLogoWidth(233)
//                .setLogoHeight(146)
//                .setStatusBarHidden(true)//设置状态栏是否隐藏
//                .setVirtualKeyTransparent(true)//设置虚拟键是否透明
//
//
//                //授权页号码栏：
//                .setNumberColor(Color.parseColor("#ffffff"))  //设置手机号码字体颜色
//                .setNumFieldOffsetBottomY(375)    //设置号码栏相对于标题栏下边缘y偏移
//                .setNumberSize(30)
//                .setNumFieldHeight(50)
//                .setNumFieldOffsetX(90)
//
//
//                //授权页登录按钮：
//                .setLogBtnText("本机号码一键登录")  //设置登录按钮文字
//                .setLogBtnTextColor(Color.parseColor("#FF262525"))   //设置登录按钮文字颜色
//                .setLogBtnImgPath(logBtnImgPath)   //设置登录按钮图片
//                .setLogBtnTextSize(16)
//                .setLogBtnHeight(49)
//                .setLogBtnOffsetBottomY(295)
//                .setLogBtnWidth(285)
//
//
//                //授权页隐私栏：
//                .setAppPrivacyOne("淘米平台协议", "https://api.253.com/api_doc/yin-si-zheng-ce/wei-hu-wang-luo-an-quan-sheng-ming.html")  //设置开发者隐私条款1名称和URL(名称，url)
//                .setAppPrivacyColor(Color.parseColor("#505661"), Color.parseColor("#48CBFF"))    //	设置隐私条款名称颜色(基础文字颜色，协议文字颜色)
//                .setPrivacyText("登录即表明同意", "和", "、", "、", "并授权淘米获取手机号")
//                .setPrivacyOffsetBottomY(42)//设置隐私条款相对于屏幕下边缘y偏
//                .setCheckBoxMargin(0, 0, 6, 16)
//                .setPrivacyState(false)
//                .setPrivacyTextSize(12)
//                .setPrivacyOffsetX(26)
//                .setSloganHidden(true)
//                .setShanYanSloganTextColor(Color.parseColor("#ffffff"))
//
//                .addCustomView(relativeLayout, false, false, null)
//                .addCustomView(relativeLayout2, false, false, null)
//                .setLoadingView(view_dialog)
//                .build();
//        return uiConfig;
//    }
//
//
//}
